<?php
namespace app\admin\validate;
use think\Validate;

class Position extends Validate
{
    protected $rule=[
        'name'=>'require|max:25|unique:position',
        'level'=>'require',
    ];
    
    protected $message=[
        'name.require'=>'部门名称必须填写',
        'name.max'=>'部门名称最多不能超过25个字符',
        'level.require'=>'部门级别必须填写',
    
    ];
    
    protected $scene = [
        'add' => ['name'=>'require','level'],
        'edit' => ['name'=>'require','level'],
    ];
}
